package com.at.dao;

import com.at.domain.Type;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.lang.model.element.TypeElement;
import java.util.List;

/**
 * @author : code1997
 * @date :2020-09-2020/9/28 18:12
 */
@Repository
public interface TypeDao extends JpaRepository<Type,Long> {

    Type getTypeByName(String name);

    @Query("select t from Type t")
    List<Type> getTop(Pageable pageable);



}
